package com.example.jpetstoreclient.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.jpetstoreclient.common.CommonResponse;
import com.example.jpetstoreclient.domain.User;

public interface UserService extends IService<User> {

    //用户登录
    CommonResponse<User> login(String username, String password);

    //注册
    CommonResponse<User> register(User user);

    //修改密码
    CommonResponse<User> resetPassword(int user_id,String oldPassword,String newPassword);

    //获取用户信息
    CommonResponse<User> getUserById(int id);

    //更改用户信息   ----在确认邮箱验证码之后
    CommonResponse<User> updateUser(User user);

    boolean checkUsername(String username);
    boolean checkPhone(String phone);
    boolean checkEmail(String email);
    boolean verifyPassword(int user_id, String password);
}
